package edu.stu.cs.software.family.base.dao;

import java.io.Serializable;
import java.util.List;

import org.springframework.data.domain.Example;
import org.springframework.data.repository.NoRepositoryBean;
import org.springframework.data.repository.PagingAndSortingRepository;

import edu.stu.cs.software.family.base.domain.BaseEntity;

/**
 * Implemented with Spring-Data Repository
 * <p>
 * Extend this interface if you want type safe (no casting necessary) DAO's for
 * your domain objects
 * 
 * @author Administrator
 *
 * @param <T> a type variable, Entity
 * @param <LG> the primary key for that type，Entity Id of Long
 */
@NoRepositoryBean
public interface GenericDao<T extends BaseEntity<LG>, LG extends Serializable> extends PagingAndSortingRepository<T, LG> {

	List<T> findAll(Example<T> ex);		

}
